<template>
	<view class="t_box">
		<view class="t_box1">
			<view class="t_box2" v-if="type != 1">
				<label class="radio" style="margin-right: 30rpx;" @click="xz(0)"><radio  value="r1" :checked="sta == 0" class="sz" />{{arr[0]}}</label>
				<label class="radio" @click="xz(1)"><radio  value="r2" :checked="sta == 1" class="sz"/>{{arr[1]}}</label>
			</view>
			<textarea class="textarea" v-model="textarea" auto-height placeholder="请输入"/>
			<view class="all_btn t_btn" @click="tj()">提交</view>
			<!-- <view class="all_btn t_btn" @click="tj()">关闭</view> -->
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr:['审批通过','退回'],
				sta:0,
				textarea:'通过'
			}
		},
		props:['type'],
		methods: {
			tj:function(){
				let list = {
					spjg:'',
					spyj:''
				}
				list.spjg = this.arr[this.sta]
				list.spyj = this.textarea
				console.log(list)
				this.$emit('tcnr',list)
			},
			xz:function(e){
				console.log(e)
				this.sta = e
			}
		}
	}
</script>

<style>
	.t_btn{
		margin-top: 30rpx;
	}
	.textarea{
		padding: 30rpx;
		box-sizing: border-box;
		border: 1px solid #CCCCCC;
		margin-top: 30rpx;
		min-height: 220rpx;
	}
	.t_box2{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.sz{
		transform: scale(0.7);
	}
	.t_box1{
		width: 90%;
		height: 500rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		padding: 30rpx;
		box-sizing: border-box;
	}
	.t_box{
		width: 100vw;
		height: 100vh;
		background: rgba(0,0,0,0.3);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10000;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>
